package InheritanceDemo;

public class Teacher extends Person {
    private String title;

    public Teacher(String id,String name,String title){
        super(id,name);
        this.title = title;

    }

    @Override
    public void showInfo(){
        super.showInfo();
        System.out.println("身份：教师，职称："+ title);
    }

}
